package training;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author liangzai
 * @Description:
 */
public class J25_5_15_Training {
    //猴子吃桃
    static int sum = 1;
    public static void main1(String[] args) {
        dfs1(sum,10);
        System.out.println(sum);
        for (int i = 0; i < 9; i++) {
            sum = sum/2-2;
        }
        System.out.println(sum);
    }

    public static void dfs1(int x,int day){
        if(day==1){
            return ;
        }
        sum = (sum+2)*2;
        dfs1(sum ,day-1);
    }

    //最长相邻不相等子序列 I
    public List<String> getLongestSubsequence(String[] words, int[] groups) {
        List<String>ans=new ArrayList<>();
        int n=groups.length;
        ans.add(words[0]);
        int t=groups[0];
        for(int i=1;i<n;i++) {
            if(t!=groups[i]) {
                ans.add(words[i]);
                t=groups[i];
            }
        }
        return ans;
    }
}







